﻿Imports JuegosLanBackend

Public Class IngresarParticipante

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Try
            Dim a = Me.nomP.Text
            Dim b = Me.apeP.Text
            Dim c = Me.fecN.Text
            Dim d
            If sexo1.Checked = True Then
                d = sexo1.Text
            Else
                d = sexo2.Text
            End If
            Dim f = Me.corP.Text
            Dim g = Me.dirP.Text

            Dim part As New ParticipanteNegocio()
            part.insertar(a, b, c, d, f, g)
            MsgBox("Se inserto con exito")

            Me.Close()

        Catch ex As Exception
            MsgBox("Error en los datos")
        End Try

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Me.nomP.Clear()
        Me.apeP.Clear()
        Me.fecN.Clear()
        Me.corP.Clear()
        Me.dirP.Clear()
        Me.sexo1.Checked = False
        Me.sexo2.Checked = False

    End Sub


    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

        Me.Close()

    End Sub

    Private Sub IngresarParticipante_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub fecN_MaskInputRejected(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MaskInputRejectedEventArgs) Handles fecN.MaskInputRejected

    End Sub
End Class